Conventionally, there is a game where a user operates a mobile hand-held terminal (hand-held game apparatus) while holding it, and an event is executed in accordance with the attitude and the position of the mobile hand-held terminal in real space. The mobile hand-held terminal includes a sensor that detects the position and the attitude of the mobile hand-held terminal in real space, and the user of the terminal advances the game by moving the mobile hand-held terminal and changing the attitude of the mobile hand-held terminal. For example, when rotation about a left-right direction of the mobile hand-held terminal (i.e., a direction parallel to the long side of a display screen of the mobile hand-held terminal) has been detected in real space, the point of view toward a virtual world displayed on the display screen changes upward and downward in accordance with the direction of the rotation and the amount of the rotation of the mobile hand-held terminal.
The mobile hand-held terminal, however, detects the rotation of the mobile hand-held terminal, and controls the point of view in accordance with the direction of the rotation and the amount of the rotation of the mobile hand-held terminal. Thus, the point of view that changes depending on a change in the attitude of the mobile hand-held terminal is controlled so as to move in a direction corresponding to the detected direction of the rotation and at a distance based on the amount of the rotation. That is, to move the point of view vertically upward and vertically downward in the virtual world, it is necessary to direct the mobile hand-held terminal vertically upward and vertically downward. This increases the amount of operation required for changing the attitude of the mobile hand-held terminal, which makes it difficult for the user to operate the mobile hand-held terminal.
Therefore, it is an object of the exemplary embodiment to provide a storage medium having stored thereon an information processing program capable of, when an image of a virtual world is displayed on a display apparatus that allows a user to view a screen thereof while holding it and an operation is performed on the virtual world in accordance with the attitude and the motion of the display apparatus, facilitating the operation based on the attitude and the motion of the display apparatus, and an information processing apparatus, an information processing system, and an information processing method that are capable of, when an image of a virtual world is displayed on a display apparatus that allows a user to view a screen thereof while holding it and an operation is performed on the virtual world in accordance with the attitude and the motion of the display apparatus, facilitating the operation based on the attitude and the motion of the display apparatus.
To achieve the above object, the exemplary embodiment may employ, for example, the following configurations. It is understood that when the description of the scope of the appended claims is interpreted, the scope should be interpreted only by the description of the scope of the appended claims. If the description of the scope of the appended claims contradicts the description of these columns, the description of the scope of the appended claims has priority.
In an exemplary configuration of a computer-readable storage medium having stored thereon an information processing program according to the exemplary embodiment, the information processing program is executed by a computer of an information processing apparatus capable of displaying an image on a portable display apparatus that outputs at least data based on an attitude and/or a motion of the portable display apparatus body. The information processing program causes the computer to execute: calculating, on the basis of the data output from the portable display apparatus, at least a direction of rotation and an amount of rotation of the portable display apparatus about a predetermined direction in real space; calculating a corrected amount of rotation by correcting the calculated amount of rotation by a predetermined factor; calculating, with respect to a direction that corresponds to the predetermined direction and is set in a virtual world, an operation indication direction based on the direction of rotation and the corrected amount of rotation; performing predetermined processing on the virtual world in accordance with the operation indication direction; generating a first image including at least a part of the virtual world subjected to the processing; and displaying the first image on the portable display apparatus.
It should be noted that the information processing apparatus may be an apparatus that performs game processing and generates an image based on the game processing, or may be a versatile apparatus such as a general personal computer. The portable display apparatus may have a size small enough to be carried by a user. Typically, the portable display apparatus may be a display apparatus that allows the user to view an image displayed thereon by holding it with both hands. Further, as in a terminal apparatus according to the embodiment described later, the portable display apparatus may or may not include components other than: means for outputting at least data based on the attitude and/or the motion of the portable display apparatus body; and means for displaying the first image.
Based on the above, when an image of a virtual world is displayed on a portable display apparatus that allows a user to view a screen thereof while holding it and an operation is performed on the virtual world in accordance with the attitude and the motion of the portable display apparatus, it is possible to facilitate the operation based on the attitude and the motion of the portable display apparatus.
In addition, in accordance with the operation indication direction, a process may be performed of controlling an attitude of a first virtual camera set in the virtual world. An image of the virtual world viewed from the first virtual camera may be generated as the first image.
Based on the above, when an operation on the point of view and/or the direction of the line of sight toward the virtual world displayed on the portable display apparatus is performed in accordance with the attitude and the motion of the portable display apparatus, it is possible to facilitate the operation based on the attitude and the motion of the portable display apparatus.
In addition, the attitude of the first virtual camera may be controlled such that the operation indication direction coincides with a direction of a line of sight of the first virtual camera.
Based on the above, the attitude of a virtual camera is controlled on the basis of the attitude of the portable display apparatus, whereby, in accordance with the user directing the portable display apparatus in the direction that they wish to view, it is possible to provide the user with, for example, an image as if peeping at the virtual world through the portable display apparatus. This makes it possible to provide the user with a feeling as if being in the virtual world.
In addition, using as the predetermined direction a horizontal direction in real space perpendicular to a perspective direction of a display screen of the portable display apparatus, a direction of rotation and an amount of rotation of the perspective direction may be calculated. The operation indication direction may be calculated so as to rotate about a horizontal direction in the virtual world on the basis of the direction of rotation and the corrected amount of rotation of the portable display apparatus.
In addition, the direction of rotation and the amount of rotation of the portable display apparatus about each of the predetermined direction, a direction of gravity in real space, and a horizontal direction in real space perpendicular to the predetermined direction may be calculated. The corrected amount of rotation may be calculated from the calculated amount of rotation about the predetermined direction. The operation indication direction may be calculated so as to: rotate about a horizontal direction in the virtual world on the basis of the direction of rotation and the corrected amount of rotation about the predetermined direction; rotate about a direction of gravity in the virtual world on the basis of the direction of rotation and the amount of rotation about the direction of gravity in real space; and rotate about a horizontal direction in the virtual world on the basis of the direction of rotation and the amount of rotation about the horizontal direction in real space perpendicular to the predetermined direction.
Based on the above, when an operation on the virtual world is performed in accordance with the attitude and the motion of the portable display apparatus in an up-down direction in real space, it is possible to facilitate the operation based on the attitude and the motion of the portable display apparatus in the up-down direction.
In addition, the corrected amount of rotation may be calculated such that, by making a magnification correction on the calculated amount of up-down rotation about the predetermined direction by a predetermined factor, the amount of up-down rotation that is less than 90° is corrected to substantially 90°.
Based on the above, it is possible to set an operation indication direction to vertically up and vertically down directions in the virtual world without directing the perspective direction of the portable display apparatus vertically upward and vertically downward in real space.
In addition, a direction of rotation and an amount of rotation of a perspective direction of a display screen of the portable display apparatus may be calculated, using as the predetermined direction a direction defined in the portable display apparatus body.
Based on the above, an amount of rotation is corrected with respect to the portable display apparatus body. This makes it possible to make corrections, regardless of the attitude of the portable display apparatus in real space.
In addition, the corrected amount of rotation may be calculated by correcting by the predetermined factor the calculated amount of rotation, of a perspective direction of a display screen of the portable display apparatus, about the predetermined direction, and offsetting the perspective direction by a predetermined amount about the predetermined direction.
Based on the above, it is possible to set as the operation indication direction in the virtual world a direction obtained by offsetting the perspective direction of the portable display apparatus in real space by a predetermined amount about a predetermined direction.
In addition, the corrected amount of rotation may be calculated by correcting by the predetermined factor the calculated amount of rotation of the perspective direction about the predetermined direction, and offsetting the perspective direction in an elevation direction or a depression direction and by a predetermined amount about the predetermined direction.
Based on the above, it is possible to set as the operation indication direction in the virtual world a direction obtained by offsetting the perspective direction of the portable display apparatus in real space in an elevation direction or a depression direction and by a predetermined amount. For example, the amount of offset is set such that the perspective direction set when the user maintains a comfortable position while holding the portable display apparatus is offset to a direction mainly indicated as the operation indication direction in the virtual world. This enables the user to operate the portable display apparatus while being in a relatively comfortable position.
In addition, the corrected amount of rotation may be calculated by making a magnification correction on the calculated amount of rotation by a predetermined factor.
Based on the above, even when changes in the attitude and/or the motion of the portable display apparatus are relatively small, it is possible to change the operation indication direction by a relatively great amount. This enables an operation on the basis of a small motion, which reduces the burden of the operation of the user.
In addition, the corrected amount of rotation may be calculated by linearly transforming the calculated amount of rotation by a predetermined factor.
Based on the above, an operation indication direction is changed by linearly transforming changes in the attitude and/or the motion of the portable display apparatus. This enables an intuitive operation using the portable display apparatus.
In addition, the corrected amount of rotation may be calculated by nonlinearly transforming the calculated amount of rotation by a predetermined factor.
Based on the above, an operation indication direction is changed by nonlinearly transforming changes in the attitude and/or the motion of the portable display apparatus. This makes it possible to change the operation indication direction by making magnification corrections on changes in the attitude and/or the motion of the portable display apparatus in accordance with the setting of the nonlinear transformation, and change the operation indication direction by making reduction corrections on changes in the attitude and/or the motion of the portable display apparatus. This enables a modulated operation in accordance with an operation environment.
In addition, the calculated amount of rotation may be transformed into the corrected amount of rotation using a nonlinear function in which the predetermined factor incrementally increases in an elevation direction and a depression direction with respect to a predetermined reference direction in real space.
Based on the above, it is likely to set the operation indication direction to a direction that corresponds to a predetermined reference direction and is included in the virtual world. Further, it is possible to generate an operation environment where a change in the operation indication direction incrementally accelerates on an operation performed in a direction away from the predetermined reference direction.
In addition, the calculated amount of rotation may be transformed into the corrected amount of rotation using a nonlinear function in which the predetermined factor decrementally decreases in an elevation direction and a depression direction with respect to a predetermined reference direction in real space.
Based on the above, it is possible to generate an operation environment where it is likely to set the operation indication direction to a direction away from a direction that corresponds to a predetermined reference direction and is included in the virtual world.
In addition, when included in a first range, the calculated amount of rotation may be transformed into the corrected amount of rotation using a first function, and when included in a second range, the calculated amount of rotation may be transformed into the corrected amount of rotation using a second function.
Based on the above, transformation functions different depending on the range of the amount of rotation are set. This makes it possible, in accordance with the range of the amount of rotation and the setting of the transformation function, to set a range in which an operation indication direction is changed by making magnification corrections on changes in the attitude and/or the motion of the portable display apparatus, and set a range in which the operation indication direction is changed by using the same values as those of changes in the attitude and/or the motion of the portable display apparatus, or by making reduction corrections on changes in the attitude and/or the motion of the portable display apparatus. This enables a modulated operation in accordance with an operation environment.
In addition, the first range may be set symmetrically about a predetermined reference direction in real space, and the predetermined factor indicated by the first function may be set to be smaller than the predetermined factor indicated by the second function.
Based on the above, it is possible to precisely set the operation indication direction based on an operation of the user near a predetermined reference direction. This makes it possible to generate an operation environment where, in a range away from the predetermined reference direction, a change in the operation indication direction is relatively great.
In addition, the predetermined reference direction may be such that when the amount of rotation indicating the predetermined reference direction is corrected to the corrected amount of rotation, a direction obtained by the corrected amount of rotation is a horizontal direction in the virtual world.
Based on the above, it is possible to set an operation environment based on the operation of setting the operation indication direction to a horizontal direction in the virtual world.
In addition, when the corrected amount of rotation indicates an amount of rotation beyond a vertically up direction in the virtual world, the corrected amount of rotation may be calculated so as to be limited to the vertically up direction. When the corrected amount of rotation indicates an amount of rotation beyond a vertically down direction in the virtual world, the corrected amount of rotation may be calculated so as to be limited to the vertically down direction.
Based on the above, the operation of setting an operation indication direction to a vertically up or vertically down direction in the virtual world is facilitated.
In addition, image data indicating the first image may be output to the portable display apparatus. The portable display apparatus may include an image data acquisition unit and a display unit. The image data acquisition unit acquires the image data output from the information processing apparatus. The display unit displays the first image indicated by the image data acquired by the image data acquisition unit.
Based on the above, the portable display apparatus can function as a so-called thin-client terminal, which does not perform information processing.
In addition, the information processing program may further cause the computer to execute generating compression image data by compressing the image data indicating the first image. In this case, the generated compression image data may be output to the portable display apparatus. The image data acquisition unit may acquire the compression image data output from the information processing apparatus. The portable display apparatus may further include a display image decompression unit. The display image decompression unit decompresses the compression image data to obtain the image data indicating the first image. The display unit may display the first image indicated by the image data that has been acquired by the image data acquisition unit and has been decompressed by the display image decompression unit.
Based on the above, the first image is decompressed before being output from the information processing apparatus to the portable display apparatus. This makes it possible to output the first image at a high speed, and reduce delay caused between the generation of the first image and the display of the first image on the portable display apparatus.
In addition, besides the first image, a second image representing the virtual world may be further displayed on another display apparatus connected to the information processing apparatus.
It should be noted that said another display apparatus described above is a display apparatus connected to the information processing apparatus, like a monitor 2 according to the embodiment described later. Said another display apparatus may be a component separate from the portable display apparatus, and may be any apparatus so long as it is capable of displaying the second image generated by the information processing apparatus. For example, said another display apparatus described above may be integrated with the game apparatus (in a single housing).
Based on the above, when processing based on the operation of moving and changing the attitude of the portable display apparatus is performed, it is possible to display the results of the processing not only on the portable display apparatus but also on said another display apparatus connected to the information processing apparatus. This enables the user to use, in accordance with the state of the operation or the user's preference, either one of images displayed on, for example, two apparatuses, and also view an image suitable for an operation of the user. Further, it is possible to use an image displayed on said another display apparatus connected to the information processing apparatus, as, for example, an image to be viewed by another person different from the user. This makes it possible to provide a viewing environment suitable also for the case where a plurality of people view the results of the processing.
In addition, the information processing program may further cause the computer to execute generating compression image data by compressing the image data indicating the first image. In this case, the generated compression image data may be output to the portable display apparatus, and, besides the compression image data, image data indicating the second image may be output to said another display apparatus without being compressed. The portable display apparatus may include an image data acquisition unit, a display image decompression unit, and a display unit. The image data acquisition unit acquires the compression image data output from the information processing apparatus. The display image decompression unit decompresses the compression image data to obtain the image data indicating the first image. The display unit displays the first image indicated by the image data that has been acquired by the image data acquisition unit and has been decompressed by the display image decompression unit.
Based on the above, the first image is decompressed and then output from the information processing apparatus to the portable display apparatus. This makes it possible to output the first image at a high speed, and reduce delay caused between the generation of the first image and the display of the first image on the portable display apparatus.
In addition, a point of view for generating the second image may be set at a position different from a position of a point of view for generating the first image.
Based on the above, the same virtual world, different in point of view, is displayed not only on the portable display apparatus but also on said another display apparatus, and images of the virtual world that are different in the point of view are displayed thereon. This enables the user to use, in accordance with the state of the operation or the user's preference, either one of the images displayed on the two apparatuses when operating the portable display apparatus.
In addition, a point of view for generating the second image may be set at a position in the virtual world including a point of view for generating the first image, and a range wider than a range of the virtual world represented by the first image may be displayed as the second image on said another display apparatus.
Based on the above, an image of the virtual world in a display range wider than that of an image of the virtual world displayed on the portable display apparatus is displayed on said another display apparatus connected to the information processing apparatus. This makes it possible to display on each display apparatus, for example, an image suitable for an operation of the user when the state of the virtual world is presented to the user.
In addition, a direction of a line of sight from a point of view for generating the second image may be set to a vertical direction in the virtual world, and the point of view for generating the second image may be set at a position of viewing from a bird's-eye view a point of view for generating the first image.
Based on the above, an image of the virtual world based on the attitude of the portable display apparatus is displayed on the portable display apparatus, and an image of the virtual world obtained by looking down upon it is displayed on another display apparatus connected to the information processing apparatus. This makes it possible to display on each display apparatus, for example, an image suitable for an operation of the user when the state of the virtual world is presented to the user.
In addition, the portable display apparatus may include at least one of a gyro sensor and an acceleration sensor, each of which outputs data based on the attitude and/or the motion of the portable display apparatus body. In this case, on the basis of the data output from the at least one of the gyro sensor and the acceleration sensor, the direction of rotation and the amount of rotation of the portable display apparatus may be calculated.
Based on the above, using the data that is output from the gyro sensor and indicates the angular velocity generated in the portable display apparatus and/or the data that is output from the acceleration sensor and indicates the acceleration generated in the portable display apparatus, it is possible to accurately calculate the attitude and the motion of the portable display apparatus.
In addition, the exemplary embodiment may be carried out in the forms of an information processing apparatus and an information processing system, each including units that perform the above processes, and an information processing method including the above operations.
The exemplary embodiment makes it possible to, when an image of a virtual world is displayed on a portable display apparatus that allows a user to view a screen thereof while holding it and an operation is performed on the virtual world in accordance with the attitude and the motion of the portable display apparatus, facilitate the operation based on the attitude and the motion of the portable display apparatus.
These and other objects, features, aspects and advantages of the exemplary embodiment will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings.